import numpy as np
import random
from PIL import ImageFont,ImageDraw,Image
font=ImageFont.truetype("font.ttf",2)
def get_length(text:str):
    image=Image.new("RGB",(100,100),(255,255,255))
    draw=ImageDraw.Draw(image)
    return draw.textlength(text=text,font=font)